// Global namespace
var MasterStroke = MasterStroke || {};

define
(    
    function()
    {
        MasterStroke.ShapeFactory = function ()
        {            
        };

        MasterStroke.ShapeFactory.createShape = function(shape, loadFunction)
        {
            var onLoad = function(shapes)
            {
                if ((loadFunction) && (shapes) && (shapes.length))
                {
                    loadFunction(shapes[0]);
                }
            }
            
            fabric.util.enlivenObjects([shape], onLoad);
        };

        return MasterStroke.ShapeFactory;
    }
)